﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MsTestUtilities;
using MsTestUtilities.Utilities;

namespace MsTestUtilitiesTests.Utilities.RequireTests
{
    [TestClass]
    public class ArgumentNotNullTests
    {
        private const string ArgumentName = "myArgument";

        [TestMethod]
        public void ArgumentIsNull_ThrowsException()
        {
            ExAssert.Throws<ArgumentNullException>(
                () => Require.ArgumentNotNull(null, ArgumentName),
                e => e.ParamName == ArgumentName);
        }

        [TestMethod]
        public void ArgumentIsNotNull_Passes()
        {
            Require.ArgumentNotNull(string.Empty, ArgumentName);
        }
    }
}
